1. Field of the Invention
The present invention relates to a position control device and method of controlling position of a robot system. The position control device includes a central processing unit (CPU) which receives moving distance data from a main CPU to compute objective position data. The object position data corresponds to a position to which the robot system is to be moved. The CPU also computes a first deviation value between the objective position data and the moved distance data of an object to be controlled every sampling time, reads the actual position data of a motor and computes a second deviation value by subtracting the motor position data previous to 1-sampling time from the actual position data of the motor. The CPU also calculates a third deviation value by subtracting the motor position data previous to 2-sampling time from the motor position data previous to 1-sampling time, and subtracts or adds a fourth deviation value derived by subtracting the third deviation value from the second deviation value, from or to the motor position data previous to 1-sampling time to control the position of the robot system.
2. Description of the Prior Art
A conventional device for positioning a robot system is disclosed, for example, in Japanese patent laid-open publication sho 52-72077, such a positioning device utilizes the digital servo technique that performs feedback of speed and position signals, as shown in FIG. 1 and 2. In FIG. 1, numerical reference number 1 indicates a position counter which counts the direction and distance up to a stop point of an object, not shown, to be position-controlled, which is previously provided with values representative of the distance the object to be controlled is to be moved. The previously set values are counted one by one in accordance with the position pulse signals from a position detector 8. The position detector 8 is mechanically combined to the rotating shaft of a servo motor 6 which drives the object to be controlled and the position-detected pulse signals are produced whenever the object moves by a unit distance.
Also, reference number 2 is a speed setting circuit which inputs the counted output value from the position counter 1 and outputs the analog speed setting signal (reference speed) 3 relative to the distance up to the stop point of the object to be controlled, the speed setting signal 3 having a positive or negative polarity in accordance with the moving direction of the object to be controlled.
Moreover, the rotating shaft of the servo motor is mechanically combined with a speed detector 7 as well. This speed detector 7 detects voltage proportional to the rotating speed of the motor 6.
In FIG. 1, reference number 4 indicates an analog subtractor which compares and subtracts the speed voltage signals, detected by the speed detector 7, with and from the speed setting signal 3 supplied from the speed setting circuit 2. The output signal of the analog subtractor 4 is provided to an analog power amplifier 5, which amplifies the input signal and outputs the amplified signal to the servo motor 6.
With this structure, the servo motor 6, the speed detector 7, the subtractor 4 and the amplifier 5 constitute a speed servo loop so that the speed of the motor 6 may be controlled on the basis of the speed setting signal 3 supplied from the speed setting circuit 2.
Herein, when the speed setting circuit 2 receives the output signal of the position counter 1 and the object to be controlled reaches the point X1 from the stop point (i.e., an origin) on the horizontal axis as shown in FIG. 2, then the speed setting circuit 2 outputs analog signal relative to the speed setting value X01 on the vertical axis representing the speed setting value X0 shown in FIG. 2. The speed setting value X0 is progressively decreased as the object to be controlled approaches the stop point and becomes zero just before the stop point. For this reason, the speed of the servo motor 6 also may be controlled to decrease progressively according to variation of the speed setting value X0. As a result, the object to be controlled can be stopped at the objective position.
According to the conventional positioning device of a robot system as shown in FIG. 1, however, since the speed setting value has a step-shaped character, then the output of the robot system may be unexpectedly varied in initial operating or decelerating and thus positional shift and creep in an output waveform are caused, resulting in a disadvantage that the robot may not be operated optimally.